using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._WorkflowManagerTools._Configuration
{
    /// <summary>
    /// <para>Export Job Data</para>
    /// <para>This tool will export the Workflow Manager (Classic) repository to a .jxl file in the specified folder location. The .jxl file will contain all the configuration information for the repository as well as information about all the jobs. The .jxl file can be imported into another Workflow Manager (Classic) repository using the Import Job Data  tool.</para>
    /// <para>此工具会将 Workflow Manager （Classic） 资料档案档案库导出到指定文件夹位置的 .jxl 文件。.jxl 文件将包含存储库的所有配置信息以及有关所有作业的信息。可以使用导入作业数据工具将 .jxl 文件导入到另一个 Workflow Manager （Classic） 资料档案库中。</para>
    /// </summary>    
    [DisplayName("Export Job Data")]
    public class ExportJobData : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExportJobData()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Folder">
        /// <para>Folder To Export To</para>
        /// <para>The location of the JXL file output from the tool. This folder can be on a local or a network drive.</para>
        /// <para>从工具输出的 JXL 文件的位置。此文件夹可以位于本地驱动器或网络驱动器上。</para>
        /// </param>
        public ExportJobData(object _Input_Folder)
        {
            this._Input_Folder = _Input_Folder;
        }
        public override string ToolboxName => "Workflow Manager Tools";

        public override string ToolName => "Export Job Data";

        public override string CallName => "wmx.ExportJobData";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_Input_Folder, _Input_DatabasePath, _Input_Repository_Name, _Input_Export_Since, _Input_Export_Until, _Output_Status];

        /// <summary>
        /// <para>Folder To Export To</para>
        /// <para>The location of the JXL file output from the tool. This folder can be on a local or a network drive.</para>
        /// <para>从工具输出的 JXL 文件的位置。此文件夹可以位于本地驱动器或网络驱动器上。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Folder To Export To")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Folder { get; set; }


        /// <summary>
        /// <para>Input Database Path (.jtc)</para>
        /// <para>The Workflow Manager (Classic) connection file for the database to be exported. If no connection file is specified, the current default Workflow Manager (Classic) database in the project is used.</para>
        /// <para>要导出的数据库的 Workflow Manager （Classic） 连接文件。如果未指定连接文件，则使用工程中的当前默认 Workflow Manager （Classic） 数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Path (.jtc)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Input_DatabasePath { get; set; } = null;


        /// <summary>
        /// <para>Repository Name</para>
        /// <para>The name of the Workflow Manager (Classic) repository that contains the configuration to be shared. If repository name is not specified, the current default Workflow Manager (Classic) repository name is used.</para>
        /// <para>包含要共享的配置的 Workflow Manager （Classic） 资料档案档案库的名称。如果未指定资料档案库名称，则使用当前默认的 Workflow Manager （Classic） 资料档案档案库名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Repository Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Input_Repository_Name { get; set; } = null;


        /// <summary>
        /// <para>Export Since</para>
        /// <para>By specifying a date, the JXL exported will only contain changes that occurred between the specified time and the current date. The input should be in UTC time format.</para>
        /// <para>通过指定日期，导出的 JXL 将仅包含指定时间和当前日期之间发生的更改。输入应采用 UTC 时间格式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Export Since")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Input_Export_Since { get; set; } = null;


        /// <summary>
        /// <para>Export Until</para>
        /// <para>By specifying a date, the JXL exported will only contain changes that occurred between Export Since and the specified time. The input should be in UTC time format.</para>
        /// <para>通过指定日期，导出的 JXL 将仅包含“导出时间”和指定时间之间发生的更改。输入应采用 UTC 时间格式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Export Until")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Input_Export_Until { get; set; } = null;


        /// <summary>
        /// <para>Status</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Status")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public long? _Output_Status { get; set; }


        public ExportJobData SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}